import {
    // action
    A_Product,
    // mutations
    M_Product,
    // getters
    G_Product

} from './type'

const state = {
    // 根据品牌选择供应商
    product: {
        supplyItem: null,
        brandCode: null
    },
    result: {}
};

const actions = {
    // 修改品牌信息
    [A_Product]({ commit }, data) {
        commit(M_Product, data);
    },

};

const mutations = {

    // 存储品牌信息
    [M_Product](state, data) {
        state.product = data
        state.result = data
    }
};

const getters = {
    // 获取品牌信息
    [G_Product](state) {
        return state;
    },

};
export default {
    state,
    getters,
    actions,
    mutations
}